<template>
<h1>单选组件</h1>
  <el-radio-group v-model="edu">
    <el-radio value="初中1" label="学历：初中"></el-radio>
    <el-radio value="高中2" label="学历：高中"></el-radio>
    <el-radio value="本科3" label="学历：本科"></el-radio>
    <el-radio value="硕士4" label="学历：硕士"></el-radio>
  </el-radio-group>
  <h3>您选择的是：{{edu}}</h3>
  <hr>
  <el-radio-group v-model="price">
    <el-radio-button v-for="item in product_arr" :value="item.price" :label="item.title"></el-radio-button>
  </el-radio-group>
  <h3>价格是：{{price}}</h3>
</template>
<script setup>
import {ref} from "vue";

const edu = ref('初中1')
const price = ref(2388)
const product_arr = ref([
  {title:'海之蓝',price:288},
  {title:'汾酒',price:388},
  {title:'茅台',price:2388},
  {title:'五粮液',price:398}
    ])
</script>


<style scoped>

</style>